package com.kotlin.flong.oop_fp


fun main(args: Array<String>) {

    var p = Person(29, "寅务")

}

class Person(var age: Int, var userName: String) {

    init {
        println("初始化主构造函数")
    }

    var phone = "" //手机号码

    //次构造函数,此构造函数是无var或val关键字
    constructor(age: Int, userName: String, phone: String) : this(age, userName) {
        println("执行次构造函数")
        //this.phone  = phone

    }

}